package top.techqi.hamtools.db.assist

import android.support.annotation.IntRange

enum class RstT(val value: Int) {
    UNKNOWN(0),
    HISSING(1),
    ROUGH(2),
    SLIGHTLY(3),
    MODERATELY(4),
    MUSICALLY(5),
    MODULATED(6),
    SMOOTH(7),
    GOOD(8),
    PUREST(9);

    companion object {
        fun valueOf(@IntRange(from = 0, to = 9) value: Int): RstT {
            return when (value) {
                1 -> RstT.HISSING
                2 -> RstT.ROUGH
                3 -> RstT.SLIGHTLY
                4 -> RstT.MODERATELY
                5 -> RstT.MUSICALLY
                6 -> RstT.MODULATED
                7 -> RstT.SMOOTH
                8 -> RstT.GOOD
                9 -> RstT.PUREST
                else -> RstT.UNKNOWN
            }
        }
    }
}
